package controllers;

import view.DisplayList;
import view.V_DisplayFeature;

/*****************************
*    Control
*   The superclass for all controllers
******************************/
public class C_Control 
{
  protected ControlManager controlManager;
  protected V_DisplayFeature vFeature;
  protected boolean active; // utility boolean
  protected float priority = 10.0f; // selection priority
  
  public void onInteract(float mouseXLoc, float mouseYLoc, String interID) {} // main run for all controllers
  public void rightClickEvent() {} // control for manual triggering by controlManager when rightClicks occur
  
  public boolean getActive()
  {
    return active;
  }
  public void setActive(boolean val)
  {
    active = val;
  }  
  public float getPriority()
  {
    return priority;
  }
  public void setPriority(float val)
  {
    priority = val;
  }
  public ControlManager getControlManager()
  {
    return controlManager;
  }
  public V_DisplayFeature getView()
  {
    return vFeature;
  }
  
  public void addSelfToList(ControlManager controllerList)
  {
	  controlManager = controllerList;
	  controllerList.addController(this);
  }
}
